import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:honeypotflutter/modules/freePay/page/free_pay_close_info/view.dart';
import 'package:honeypotflutter/public/public_get.dart';
import 'package:honeypotflutter/publicBussine/bussine_colors.dart';
import 'package:honeypotflutter/publicBussine/bussine_font.dart';
import 'package:honeypotflutter/publicBussine/bussine_image.dart';
import 'package:honeypotflutter/public/views/public_appBar.dart';
import 'logic.dart';

class FreePayClosePage extends StatefulWidget {
  const FreePayClosePage({Key? key}) : super(key: key);

  @override
  State<FreePayClosePage> createState() => _FreePayClosePageState();
}

class _FreePayClosePageState extends State<FreePayClosePage> {
  final FreePayCloseLogic logic = Get.put(FreePayCloseLogic());

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: HLAppBar(navigationTitle: "关闭免密支付"),
      body: Container(
        width: double.infinity,
        height: double.infinity,
        padding: EdgeInsets.only(bottom: 80),
        decoration: BoxDecoration(
          image: DecorationImage(image: AssetImage(MGImage.image("freePay_backImage.png", type: ImagePathType.freePay))),
        ),
        child: Column(
          children: [
            Text(
              "已开通支付宝免密支付",
              style: TextStyle(
                fontSize: MGFont.textFont2,
                color: MGColors.text1Color,
                fontWeight: FontWeight.bold,
              ),
            ),
            SizedBox(height: 40),
            InkWell(
              child: Text(
                "如何关闭服务",
                style: TextStyle(
                  fontSize: MGFont.textFont2,
                  color: MGColors.blueColor,
                  decoration: TextDecoration.underline,
                  decorationColor: MGColors.blueColor,
                ),
              ),
              onTap: () {
                HLGet.to(FreePayCloseInfoPage());
              },
            )
          ],
          mainAxisAlignment: MainAxisAlignment.end,
        ),
      ),
    );
  }

  @override
  void dispose() {
    Get.delete<FreePayCloseLogic>();
    super.dispose();
  }
}
